import request from "@/utils/request";
//引入类型
import type { CouponInfoListAllModel, CouponInfoModel } from "./model/couponModel";

//获取列表数据
export const reqGetCouponList = (page: number, limit: number) => {
  return request.get<any, CouponInfoListAllModel>(`/admin/activity/couponInfo/${page}/${limit}`);
};

//通过id删除优惠券
export const reqDeleteCoupon = (id: number) => {
  return request.delete<any, null>(`/admin/activity/couponInfo/remove/${id}`);
};

//新增优惠券
export const reqAddCoupon = (data: CouponInfoModel) => {
  return request.post("/admin/activity/couponInfo/save", data);
};
